#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2020-08-26 11:36:13
# @Author  : Zuo Zhongfei (zuozhongfei@126.com)
# @Link    : www
# @Version : $Id$

import os
# 练习：

# 创建一个包含魔术师名字的列表，并将其传递给一个名为show_magicians()的函数，这个函数打印列表中每个魔术师的名字。


def show_magicians(magicians):
    for magician in magicians:
        print("magician:" + magician.title())


magicians = ['xiaoli', 'xiaowang', 'xiaozhang']
show_magicians(magicians)

# 在你为完成练习8-9而编写的程序中，编写一个名为make_great()的函数，对魔术师列表进行修改，
# 在每个魔术师的名字中都加入字样“the Great”。调用函数show_magicians()，确认魔术师列表确实变了。


def edit_magicians(magicians):

    while magicians:
        current_magician = magicians.pop()
        current_magician = "the Great " + current_magician
        magicians.append(current_magician)
        print("修改完了一个")


magicians = ['xiaoli', 'xiaowang', 'xiaozhang']
edit_magicians(magicians)
print("\n" + magicians)
